<?xml version="1.0" encoding="UTF-8"?>
<!--
To change this template, choose Tools | Templates
and open the template in the editor.
-->
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html" 
      xmlns:pou="http://primefaces.org/ui"
      xmlns:f="http://java.sun.com/jsf/core">
    <head>
        <title>TODO supply a title</title>
    </head>
    <body>
        <ui:composition>
            <pou:confirmDialog id="confirmDialog" message="Esta seguro de descartar los datos de esta carga?"  
                               header="Eliminacion de Carga de Datos" severity="alert" widgetVar="confirmation">  
                <pou:commandButton id="confirm" value="Si" update="@form" onstart="confirmation.hide();bui.show();" 
                                   actionListener="#{mbCargasDatos.doDelete}" />  
                <pou:commandButton id="decline" value="No" onclick="confirmation.hide()" type="button" />   
            </pou:confirmDialog> 
            <pou:tabView id="tabnavegador">

                <pou:tab title="#{mbNavigator.configuration.title}" >
                    <h:panelGrid  style="width: 1000px;">
                        <pou:commandButton type="button" value="Eliminar" onclick="confirmation.show()">
                        </pou:commandButton>
                        <h:panelGroup rendered="false"  id="header">
                            <pou:panel header="Opciones">
                                <h:panelGrid columns="3">
                                    <h:outputLabel value="Navegar en: " />
                                    <pou:selectOneMenu value="#{mbNavigator.navigator}">
                                        <f:selectItems value="#{mbNavigator.navigatorTypes}" var="t"
                                                       itemValue="#{t.codigo}" itemLabel="#{t.descripcion}" />
                                    </pou:selectOneMenu>
                                    <pou:commandButton actionListener="#{mbNavigator.loadNavigator()}"
                                                       value="Cargar Datos" onstart="dlgwait.show()"
                                                       ajax="false" />
                                </h:panelGrid>
                            </pou:panel>
                        </h:panelGroup>
                        <h:panelGroup rendered="#{mbNavigator.configuration!=null }" id="detail">
                            <pou:dataTable value="#{mbNavigator.configuration.customDataTableController.rows}" 
                                           emptyMessage="No hay registros cargados!"  paginator="true" 
                                           var="r" rows="25" rowIndexVar="index">
                                <pou:column sortBy="#{r.col1.value}"  filterBy="#{r.col1.value}" filterMatchMode="contains" rendered="#{r.col1.show}">
                                    <f:facet name="header">  
                                        <h:outputText value="#{r.col1.title}" />  
                                    </f:facet>  
                                    <h:outputText value="#{r.col1.value}" />
                                </pou:column>
                                <pou:column  sortBy="#{r.col2.value}"  filterBy="#{r.col2.value}" filterMatchMode="contains" rendered="#{r.col2.show}" >
                                    <f:facet name="header">  
                                        <h:outputText value="#{r.col2.title}" />  
                                    </f:facet>
                                    <h:outputText value="#{r.col2.value}" />
                                </pou:column>
                                <pou:column sortBy="#{r.col3.value}"  rendered="#{r.col3.show}" filterBy="#{r.col3.value}" filterMatchMode="contains">
                                    <f:facet name="header">  
                                        <h:outputText value="#{r.col3.title}" />  
                                    </f:facet>
                                    <h:outputText value="#{r.col3.value}" />
                                </pou:column>
                                <pou:column sortBy="#{r.col4.value}"  rendered="#{r.col4.show}" filterBy="#{r.col4.value}" filterMatchMode="contains">
                                    <f:facet name="header">  
                                        <h:outputText value="#{r.col4.title}" />  
                                    </f:facet>
                                    <h:outputText value="#{r.col4.value}" />
                                </pou:column>
                                <pou:column sortBy="#{r.col5.value}"  rendered="#{r.col5.show}" filterBy="#{r.col5.value}" filterMatchMode="contains">
                                    <f:facet name="header">  
                                        <h:outputText value="#{r.col5.title}" />  
                                    </f:facet>
                                    <h:outputText value="#{r.col5.value}" />
                                </pou:column>
                                <pou:column sortBy="#{r.col6.value}"  rendered="#{r.col6.show}" filterBy="#{r.col6.value}" filterMatchMode="contains">
                                    <f:facet name="header">  
                                        <h:outputText value="#{r.col6.title}" />  
                                    </f:facet>
                                    <h:outputText value="#{r.col6.value}" />
                                </pou:column>
                                <pou:column sortBy="#{r.col7.value}" rendered="#{r.col7.show}" filterBy="#{r.col7.value}" filterMatchMode="contains">
                                    <f:facet name="header">  
                                        <h:outputText value="#{r.col7.title}" />  
                                    </f:facet>
                                    <h:outputText value="#{r.col7.value}" />
                                </pou:column>
                                <pou:column sortBy="#{r.col8.value}"  rendered="#{r.col8.show}" filterBy="#{r.col8.value}" filterMatchMode="contains">
                                    <f:facet name="header">  
                                        <h:outputText value="#{r.col8.title}" />  
                                    </f:facet>
                                    <h:outputText value="#{r.col8.value}" />
                                </pou:column>
                            </pou:dataTable>
                        </h:panelGroup>
                    </h:panelGrid>
                </pou:tab>
            </pou:tabView>
        </ui:composition>
    </body>
</html>
